﻿namespace Phone.Framework
{
    using System;
    using System.Windows;
    using System.Windows.Media;

    public static class ThemeResources
    {
        private static T GetResource<T>(string key)
        {
            return (T) Application.Current.Resources[key];
        }

        public static bool IsDarkTheme
        {
            get
            {
                return (PhoneDarkThemeVisibility == Visibility.Visible);
            }
        }

        public static SolidColorBrush PhoneAccentBrush
        {
            get
            {
                return GetResource<SolidColorBrush>("PhoneAccentBrush");
            }
        }

        public static SolidColorBrush PhoneBackgroundBrush
        {
            get
            {
                return GetResource<SolidColorBrush>("PhoneBackgroundBrush");
            }
        }

        public static SolidColorBrush PhoneDisabledBrush
        {
            get
            {
                return GetResource<SolidColorBrush>("PhoneDisabledBrush");
            }
        }
        

        public static SolidColorBrush PhoneChromeBrush
        {
            get
            {
                return GetResource<SolidColorBrush>("PhoneChromeBrush");
            }
        }

        public static Visibility PhoneDarkThemeVisibility
        {
            get
            {
                return GetResource<Visibility>("PhoneDarkThemeVisibility");
            }
        }

        public static FontFamily PhoneFontFamilySemiBold
        {
            get
            {
                return GetResource<FontFamily>("PhoneFontFamilySemiBold");
            }
        }

        public static SolidColorBrush PhoneForegroundBrush
        {
            get
            {
                return GetResource<SolidColorBrush>("PhoneForegroundBrush");
            }
        }

        public static SolidColorBrush PhoneSubtleBrush
        {
            get
            {
                return GetResource<SolidColorBrush>("PhoneSubtleBrush");
            }
        }

        public static Style PhoneTextAccentStyle
        {
            get
            {
                return GetResource<Style>("PhoneTextAccentStyle");
            }
        }

        public static Style PhoneTextBlockBase
        {
            get
            {
                return GetResource<Style>("PhoneTextBlockBase");
            }
        }

        public static Style PhoneTextContrastStyle
        {
            get
            {
                return GetResource<Style>("PhoneTextContrastStyle");
            }
        }

        public static Style PhoneTextExtraLargeStyle
        {
            get
            {
                return GetResource<Style>("PhoneTextExtraLargeStyle");
            }
        }

        public static double PhoneFontSizeExtraLarge
        {
            get
            {
                return GetResource<double>("PhoneFontSizeExtraLarge");
            }
        }

        public static Style PhoneTextGroupHeaderStyle
        {
            get
            {
                return GetResource<Style>("PhoneTextGroupHeaderStyle");
            }
        }

        public static Style PhoneTextHugeStyle
        {
            get
            {
                return GetResource<Style>("PhoneTextHugeStyle");
            }
        }

        public static Style PhoneTextLargeStyle
        {
            get
            {
                return GetResource<Style>("PhoneTextLargeStyle");
            }
        }

        public static Style PhoneTextNormalStyle
        {
            get
            {
                return GetResource<Style>("PhoneTextNormalStyle");
            }
        }

        public static Style PhoneTextSmallStyle
        {
            get
            {
                return GetResource<Style>("PhoneTextSmallStyle");
            }
        }

        public static Style PhoneTextSubtleStyle
        {
            get
            {
                return GetResource<Style>("PhoneTextSubtleStyle");
            }
        }

        public static Style PhoneTextTitle1Style
        {
            get
            {
                return GetResource<Style>("PhoneTextTitle1Style");
            }
        }

        public static Style PhoneTextTitle2Style
        {
            get
            {
                return GetResource<Style>("PhoneTextTitle2Style");
            }
        }

        public static Style PhoneTextTitle3Style
        {
            get
            {
                return GetResource<Style>("PhoneTextTitle3Style");
            }
        }
    }
}

